\input ../../default-cn-cfg.mkvi
\setupcaption[table][location=top]

%%%
\definextable[generalxtable][
split=yes,header=repeat,footer=repeat,
foregroundstyle=\rm\tfx,%设置正文字体 ,\setupframed参数
textwidth=8cm,option=stretch,align=middle,
frame=on,rulethickness=0.1pt
]

\definextable[headrow][generalxtable][
foregroundcolor=red,
foregroundstyle=\ss\tfx,%设置正文字体 ,\setupframed参数
]

\definextable[footrow][generalxtable][
foregroundcolor=blue,
foregroundstyle=\rm\fsx,%设置正文字体 ,\setupframed参数
]

%%%%

\starttext
\dorecurse{1}{ \input ../../hetangyuese/htys01.mkvi}
\startplacefloat[table][title=最简单表格,location={left}]
  \startxtable[generalxtable]
    \startxtablehead[headrow]
      \startxrow
        \startxcell  表头 1
        \stopxcell
        \startxcell  表头 2
        \stopxcell
        \startxcell  表头 3
        \stopxcell
        \startxcell  表头 4
        \stopxcell
      \stopxrow
    \stopxtablehead

    \startxtablefoot[footrow]
      \startxrow
        \startxcell  表脚 1
        \stopxcell
        \startxcell  表脚 2
        \stopxcell
        \startxcell  表脚 3
        \stopxcell
        \startxcell  表脚 4
        \stopxcell
      \stopxrow
    \stopxtablefoot

    \startxtablebody
      \dorecurse{10}{
      \startxrow
        \startxcell  行\low{\recurselevel}格1
        \stopxcell
        \startxcell  行\low{\recurselevel}格2
        \stopxcell
        \startxcell  行\low{\recurselevel}格3
        \stopxcell
        \startxcell  行\low{\recurselevel}格4
        \stopxcell
      \stopxrow
      }
    \stopxtablebody

  \stopxtable

\stopplacefloat

\dorecurse{2}{ \input ../../hetangyuese/htys01.mkvi}
\stoptext
